/*
 * Copyright (c) 2011-2023, ThinkWide (cnet2001@163.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.thinkwide.data.ormapping.db;

/**
 * 数据库类型
 *
 * @author andyzhang
 * @since 2011/06/07
 */
public enum MFDbType {
    MYSQL("com.mysql.cj.jdbc.Driver", "jdbc:mysql://{ip}:3306/{db}?serverTimezone=UTC&characterEncoding=utf-8&useSSL=false"),
    MSSQL("com.microsoft.sqlserver.jdbc.SQLServerDrive", "jdbc:sqlserver://{ip}:1433;DatabaseName={db}"),
    ORACLE("oracle.jdbc.OracleDriver", "jdbc:oracle:thin:@{ip}:1521:{db}"),
    DB2("com.ibm.db2.jcc.DB2Driver", "jdbc:db2://{ip}:50000/{db}"),
    POSTGRESQL("org.postgresql.Driver", "jdbc:postgresql://{ip}:5432/{db}"),

    /*神通数据库*/
    OSCAR("com.oscar.Driver", "jdbc:oscar://{ip}:2003/{db}?serverTimezone=UTC&useSSL=FALSE"),
    /*达梦数据库*/
    DM("dm.jdbc.driver.DmDriver", "jdbc:dm://{ip}:5236/{db}"),
    /*南大通用数据*/
    GBASE("com.gbase.jdbc.Driver", "jdbc:gbase://{ip}:5258/{db}"),
    /*人大金仓*/
    KINGBASE("com.kingbase8.Driver", "jdbc:kingbase8://{ip}:54321/{db}");

    private String drive;

    private String url;

    MFDbType(String drive, String url) {
        this.drive = drive;
        this.url = url;
    }

    public String getDrive() {
        return drive;
    }

    public String getUrl() {
        return url;
    }
}
